Python for Kids by Jason R. Briggs
Author:Jason R. Briggs [Jason R. Briggs]
Language: eng
Format: epub, mobi, pdf
Tags: JUVENILE NONFICTION / Computers / Programming
ISBN: 9781593274948
Publisher: No Starch Press
Published: 2012-11-17T16:00:00+00:00
When you select a color and click OK, a tuple will be displayed. This tuple contains another tuple with three numbers and a string:
>>> colorchooser.askcolor() ((235.91796875, 86.3359375, 153.59765625), '#eb5699')
The three numbers represent the amounts of red, green, and blue. In tkinter, the amount of each primary color to use in a color combination is represented by a number between 0 and 255 (which is different from using a percentage for each primary color with the turtle module). The string in the tuple contains the hexadecimal version of those three numbers.
You can either copy and paste the string value to use or store the tuple as a variable, and then use the index position of the hexadecimal value.
Let’s use the random_rectangle function to see how this works.
>>> c = colorchooser.askcolor() >>> random_rectangle(400, 400, c[1])
Here’s the result:
Download
Python for Kids by Jason R. Briggs.mobi
Python for Kids by Jason R. Briggs.pdf
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.
The Art of Coaching Workbook by Elena Aguilar(50033)
Trainspotting by Irvine Welsh(20940)
Twilight of the Idols With the Antichrist and Ecce Homo by Friedrich Nietzsche(18266)
Fangirl by Rainbow Rowell(8751)
Periodization Training for Sports by Tudor Bompa(7887)
Change Your Questions, Change Your Life by Marilee Adams(7317)
This Is How You Lose Her by Junot Diaz(6400)
Asking the Right Questions: A Guide to Critical Thinking by M. Neil Browne & Stuart M. Keeley(5317)
Grit by Angela Duckworth(5260)
Red Sparrow by Jason Matthews(5165)
Paper Towns by Green John(4750)
Room 212 by Kate Stewart(4700)
Ken Follett - World without end by Ken Follett(4409)
The Sports Rules Book by Human Kinetics(4041)
Housekeeping by Marilynne Robinson(4014)
Double Down (Diary of a Wimpy Kid Book 11) by Jeff Kinney(3870)
Papillon (English) by Henri Charrière(3869)
The Motorcycle Diaries by Ernesto Che Guevara(3753)
Exercise Technique Manual for Resistance Training by National Strength & Conditioning Association(3747)
